// 直播资源表

package dbModel

import "time"

type VodResource struct {
	Id             string    `json:"id" gorm:"primary_key; column:id;type:varchar(255)"`
	AreaName       string    `json:"areaName" gorm:"column:area_name; type:varchar(255)" validate:"required"`
	ProgramName    string    `json:"programName" gorm:"column:program_name; type:varchar(255)" validate:"required"`
	SignalStatus   int       `json:"signalStatus" gorm:"column:signal_status; type:int" validate:"required"` // 点播资源信号状态 0-正常  1-异常
	PreviewUrl     string    `json:"previewUrl" gorm:"column:preview_url; type:text"`
	DownloadStatus int       `json:"downLoadStatus" gorm:"column:download_status; type:int" validate:"required"` // 点播资源下载状态 0-未下载  1-已下载 2-下载失败
	StartTime      time.Time `json:"startTime" gorm:"column:start_time;"`
	EndTime        time.Time `json:"endTime" gorm:"column:end_time;"`
	CreateTime     time.Time `json:"-" gorm:"column:create_time; autoCreateTime"`
	UpdateTime     time.Time `json:"-" gorm:"column:update_time; autoUpdateTime"`
}

// 数据表
func (*VodResource) TableName() string {
	return "vod_resource"
}
